Clarify the name of a callback
authorStephen Shaw <sshaw@decriptor.com>
Tue, 5 Oct 2010 17:59:45 +0000 (12:59 -0500)
committerFederico Mena Quintero <federico@novell.com>
Tue, 5 Oct 2010 20:35:31 +0000 (15:35 -0500)
The old save_entry_get_info_cb() was misnamed; it is actually used
to see if a file's presumed parent *is* a folder.  So we rename
it to name_entry_get_parent_info_cb().

Signed-off-by: Federico Mena Quintero <federico@novell.com>
gtk/gtkfilechooserdefault.c

index 71cc5275da490284d6676a47d1cd1f9256a32dc7..9fceb8aa70531b30309167c93130935db4ffde8d 100644 (file)
@@ -8138,10 +8138,10 @@ struct FileExistsData
 };
 
 static void
-save_entry_get_info_cb (GCancellable *cancellable,
-                       GFileInfo    *info,
-                       const GError *error,
-                       gpointer      user_data)
+name_entry_get_parent_info_cb (GCancellable *cancellable,
+                              GFileInfo    *info,
+                              const GError *error,
+                              gpointer      user_data)
 {
   gboolean parent_is_folder;
   gboolean cancelled = g_cancellable_is_cancelled (cancellable);
@@ -8185,7 +8185,7 @@ save_entry_get_info_cb (GCancellable *cancellable,
          else
            g_signal_emit_by_name (data->impl, "response-requested");
        }
-      else /* GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER */
+      else if (data->impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
         {
          GError *error = NULL;
 
@@ -8198,6 +8198,8 @@ save_entry_get_info_cb (GCancellable *cancellable,
          else
            error_creating_folder_dialog (data->impl, data->file, error);
         }
+      else
+       g_assert_not_reached ();
     }
   else
     {
@@ -8299,7 +8301,7 @@ file_exists_get_info_cb (GCancellable *cancellable,
        _gtk_file_system_get_info (data->impl->file_system,
                                   data->parent_file,
                                   "standard::type",
-                                  save_entry_get_info_cb,
+                                  name_entry_get_parent_info_cb,
                                   data);
       set_busy_cursor (data->impl, TRUE);
     }